<%-- 自定义实体添加页面 --%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/views/common/taglibs.jsp" %>

<!DOCTYPE>
<html>
<head>
    <!-- 引入通用js、css文件(xiaogq) -->
    <meta name="decorator" content="bootstrap"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/system/custom/entity/entity_add.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/common/operation/sys_operation.css"/>
</head>
<body>
<!-- 加载列表操作 -->
<div class="button_list">
    <a href="javascript:;" onclick="saveDept()">
        <span class="span_button">
            <span><img src="${ctx}/image/common/operation/oper_SAVE.png"></span>
            <span name="buTitle">保存</span>
        </span>
    </a>
    <a href="javascript:;" onclick="javascript:parent.closeTab();">
        <span class="span_button">
            <span><img src="${ctx}/image/common/operation/oper_CANCEL.png"></span>
            <span name="buTitle">取消</span>
        </span>
    </a>
</div>

<div class="content row">
    <h3>基础信息</h3>
    <hr>
    <form role="form" class="entityForm" id="entity_form" method="post" action="${ctx}/Dept/saveAddDept.do" enctype="multipart/form-data">
        <input type="hidden" id="deptRank" name="deptRank" value="${dept.deptRank}">
        <div class="row">
            <div class="col-lg-5 col-md-5">
                <div class="form-group">
                    <label for="pk_t_2_1_osv" class="col-lg-3 col-md-3 control-label">父级部门:<span style="color: red">*</span></label>
                    <div class="col-lg-9 col-md-9">
                        <input type="hidden" class="form-control" id="pk_t_2_1" name="parent.id" value="${dept.parent.id}"/>
                        <input type="input" class="form-control" id="pk_t_2_1_osv" value="${dept.name}" onclick="deptQuoteClick(this)"/>
                    </div>
                </div>
            </div>
            <div class="col-lg-5 col-md-5">
                <div class="form-group">
                    <label for="name_varchar" class="col-lg-3 col-md-3 control-label">部门名称:<span style="color: red">*</span></label>
                    <div class="col-lg-9 col-md-9">
                        <input type="text" class="form-control" id="name_varchar" name="name"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-5 col-md-5">
                <div class="form-group">
                    <label for="plait_people_decimal" class="col-lg-3 col-md-3 control-label">编制人数:</label>
                    <div class="col-lg-9 col-md-9">
                        <input type="number" class="form-control" id="plait_people_decimal" name="plaitPeople" placeholder="请输入数值">
                    </div>
                </div>
            </div>
            <div class="col-lg-5 col-md-5">
                <div class="form-group">
                    <label for="dept_description_textarea" class="col-lg-3 col-md-3 control-label">描述:</label>
                    <div class="col-lg-9 col-md-9">
                        <textarea class="form-control" rows="2" id="dept_description_textarea" name="description"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="${ctx}/js/common/selectFirst.js"></script>
<script type="text/javascript" src="${ctx}/js/system/organization/dept/dept.js"></script>
<script type="text/javascript">
    //所属部门下拉模糊查询方法
    function deptQuoteClick(node){
        var datas = ${deptDatas};
        selectOnly(node,datas);
    }
</script>
</body>
</html>
